package com.ultimatech.wxservice.web.controller;

import com.ultimatech.webappdemo.base.model.SysUser;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by 张乐平 on 7/28 0028.
 */
@Controller
public class HomeController extends MainsiteErrorController {

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public String index(Model model) {
        return "index";
    }

    @RequestMapping(value = "/login", method = RequestMethod.GET)
    public String loginForm(Model model) {
        model.addAttribute("user", new SysUser());
        return "login";
    }

    @RequestMapping(value = "/main", method = RequestMethod.GET)
    public String main(Model model) {
        model.addAttribute("user", new SysUser());
        return "main";
    }

//    @RequestMapping(value = "/500", method = RequestMethod.GET)
//    public String page500(Model model) {
//        return "500";
//    }
}
